body {
	/* Nasty hack to center in IE part 1 */
	text-align: center;
	/* By default, use less-stylistic digits from Gentium */
	font-family: 'IM Fell English No-Digits', 'Gentium Book Basic', Georgia, serif;
	font-size: 13pt;
	line-height: 15.2pt;
	background: #EEE;
	width: 65em;
	margin-left: auto;
	margin-right: auto;
}
* {
	/* Nasty hack to center in IE part 2 */
	text-align: left;
}
a {
	color: #333;
}
a:visited {
	color: #999;
}
a:hover {
	color: #777;
}

header {
	margin-top: 2.2em;
	margin-bottom: 0.7em;
	transition: margin 0.3s;
	display: block;
}
main {
	display: grid;
	grid-template-columns: fit-content(20%) 1fr;
	border: 1px solid #CCC;
	padding: 1.5em;
	transition: padding 0.3s;
	background: #FEFEFE;
}

main li {
	padding-top: 0.5em;
	padding-bottom: 0.15em;
}

main ul {
	list-style-type: square;
	padding-left: 1em;
	margin-left: 0;
}

#art_header {
	grid-column: 1 / 3
}

footer {
	grid-column: 2;
	text-align: right;
	margin-top: 0.35em;
	color: #999;
	margin-bottom: 4.5em;
}

article {
	padding-top: 1em;
	overflow: hidden;
}
article aside {
	width: 30vh;
	padding-left: 0.5rem;
	margin-left: 0.5rem;
	float: right;
}
article p {
	padding: 0;
	margin: 0;
}
article > * + p, article > table {
	margin-top: 1.1em;
}
article > li p + p {
	padding-top: 0.11em;
	margin-left: 1em;
}
article img {
	width: 30em;
	max-width: 95%;
	display: block;
	padding: 0.5em 0 0.5em 0;
}
article table {
	border-collapse: collapse;
	display: block;
	max-width: -moz-fit-content;
	max-width: fit-content;
	white-space: nowrap;
	overflow-y: auto;
}
article tr, article th {
	padding: 1em;
	border: 1px solid;
}
article th {
	background: #ccc;
}
article li {
	padding: 0.1em;
}
article ol ol {
	list-style-type: lower-alpha;
}
article ol ol ol {
	list-style-type: lower-roman;
}
article pre {
	padding: 1em;
	background: #343434;
	color: #DDD;
	font-size: 12pt;
}
/* Gross hack, probably will break something */
article pre > code:only-child {
	display: block;
	overflow-y: auto;
}
article :not(pre) > code {
	background: #F0F0F0;
	font-size: 12pt;
}
article blockquote, article aside {
	padding-left: 0.5em;
}
article blockquote {
	border-left: 0.3em solid #CCC;
	margin-left: 0.5em;
}
article aside {
	border-left: 0.1em solid #DDD;
	margin-left: 1em;
	margin-top: 0.5em;
}
article figcaption {
	font-style: italic;
	font-size: 11pt;
	color: #666;
}
article figure {
	margin: 0;
}
article aside img {
	width: 100%;
}
article h1 {
	border-bottom: 0.01em solid #555;
	font-size: 20pt;
}
article h2 {
	font-size: 17.5pt;
}
article h3 {
	font-size: 14pt;
}
article h4, h5, h6 {
	font-size: 13pt;
	font-weight: normal;
	text-decoration: underline;
	text-decoration-style: dotted;
}

#title {
	font-size: 28pt;
	font-family: 'Gentium Book Basic', Georgia, serif;
}
#title a {
	text-decoration: none;
}
#logo {
	font-size: 40pt;
	line-height: 28pt;
	margin-right: 5pt;
	vertical-align: middle;
	cursor: cell;
	user-select: none;
}

#byline {
	margin: 0;
	padding-bottom: 1.2em;
	border-bottom: 0.1em solid #CCC;
}
#byline::before {
	content: '\2592';
	margin-right: 0.2em;
}

#breadcrumbs li {
	display: inline;
}
#breadcrumbs {
	padding: 0;
	margin: 0;
}
#breadcrumbs li {
	vertical-align: middle;
}
#breadcrumbs li::after {
	content: ' \290E';
	padding-right: 0.2em;
}
#breadcrumbs li:nth-last-child(2)::after {
	content: ' \21D6';
}
#breadcrumbs li:last-child {
	display: block;
	padding-top: 0.35em;
	font-size: 24pt;
	/* Use stylized digits */
	font-family: 'IM Fell English', 'Gentium Book Basic', Georgia, serif;
}
#breadcrumbs li:last-child a, #breadcrumbs li:last-child a:hover, #breadcrumbs li:last-child a:visited {
	text-decoration: none;
	color: #000;
}
#breadcrumbs li:last-child::after {
	content: '';
}

/* This is our TOC holder */
#toc {
	line-height: 13pt;
	position: sticky;
	top: 0;
	align-self: start;
	overflow-y: scroll;
	max-height: 100vh;
	padding-right: 1em;
	margin-top: 0.75em;
	margin-right: 1em;
	border-right: 1px solid #ccc;
}
#toc h3 {
	margin: 0;
	padding: 5pt;
}

/* This is the built-in TOC nav */
#TableOfContents ul {
	transition: margin 0.1s;
}
#TableOfContents li {
	list-style-type: square;
	list-style-position: inside;
}
#TableOfContents li > ul {
	border-left: 1px dotted #ddd;
}
#TableOfContents a {
	text-decoration: none;
}
#TableOfContents li, #TableOfContents li > ul {
	padding-top: 0.3em;
}

#page_list li, #links + ul li {
	margin-top: 0.5em;
}
#page_list a, #links + ul a {
	text-transform: lowercase;
}

@media only screen and (max-width: 70em) {
	body {
		width: auto;
	}
	header {
		margin-top: 1em;
	}
	main {
		padding: 0.75em;
		margin: 0.4em;
	}
	footer {
		margin-bottom: 0.5em;
		width: 100%;
	}
}
@media only screen and (max-width: 45em) {
	main {
		grid-template-columns: 1fr;
	}
	/* TODO: Should make this move to more columns? */
	/* TODO: This creates some extra whitespace on pages with no TOC right now */
	#toc {
		grid-column: 1 / 3;
		position: inherit;
		max-height: 7.5em;
		border-right: none;
		border-bottom: 1px solid #ccc;
	}
	#toc ul {
		margin: 0;
	}
}
